package cn.lyjuan.archetypes.bms.web.util;

import org.springframework.util.StringUtils;

/**
 * Created by chad on 2016/8/24.
 */
public class SuperAdminUtils
{
    public static final String ADMIN_USERNAME = "admin";

    /**
     * 是否为超级管理员
     * todo 方式需要修改
     * @param createBy
     * @return
     */
    public static boolean isSuperManager(String createBy)
    {
        return StringUtils.isEmpty(createBy);
    }

    /**
     * 是否为超级管理员
     * @param username
     * @return
     */
    public static boolean isAdmin(String username)
    {
        return ADMIN_USERNAME.equals(username);
    }
}
